package com.ibeeking.found.msg.api.feign;

import com.ibeeking.found.msg.api.common.dto.MemberInfoDTO;
import com.ibeeking.found.msg.api.common.dto.TagsDefineDTO;
import com.ibeeking.found.msg.api.common.query.FeignTagsDefineQuery;
import com.ibeeking.found.msg.api.feign.fallback.MsgMemberBFallbackFactory;
import com.ibeeking.nematos.utils.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Set;

/**
 * @Author ibeeking
 */
@FeignClient(name = "mall-member-b-server", path = "/b", contextId = "msgMemberBClient", fallbackFactory = MsgMemberBFallbackFactory.class, decode404 = true)
public interface MsgMemberBClient {
    /**
     * 根据会员id查询会员
     *
     * @param id
     * @return
     */
    @PostMapping(value = "/infoOne/{id}")
    ResponseResult<MemberInfoDTO> infoOne(@PathVariable("id") Long id);
    /**
     * 根据会员id查询会员
     *
     * @param ids
     * @return
     */
    @PostMapping(value = "/member/feign/v1/info")
    ResponseResult<List<MemberInfoDTO>> memberInfo(@RequestBody Set<Long> ids);
    /**
     * 根据传入的手动标签id查询
     *
     * @param query
     * @return
     */
    @PostMapping(value = "/tags/feign/v1/effectiveManualList")
    ResponseResult<List<TagsDefineDTO>> effectiveManualList(@RequestBody FeignTagsDefineQuery query);

}
